Conventionally, pixel interpolation methods using a simple mean process have been used as pixel interpolation methods to interpolate pixels of image data obtained by analog-to-digital conversion of photographic data photographed by a charge-coupled device having pixels arranged in a Bayer array with an RGB filter.
In a Bayer array format, image data contains red (R), green (G), and blue (B) data at varying pixel locations based on a color filter array which overlies the sensor. Since the sensor does not provide image data for all three colors for each pixel, pixel interpolation is required to produce three full color image frames, one corresponding to each color.
FIG. 8 shows part of the G data of pixels in a green (G) data series produced by color separation. In FIG. 8, reference numbers G11, G12, G13, and G14 represent originally present pixels. Pixel GX is interpolated between pixels G11 through G14, and is referred to as an interpolated pixel. In the conventional simple mean method, the pixel value of the interpolated pixel GX is expressed by Equation (1) below. EQU GX=(G11+G12+G13+G14)/4 (1)
In Equation (1), reference numbers G11 through G14, and GX represent the pixel value of pixels G11 through G14, and interpolation pixel GX.
In FIG. 8, when there is virtually no variation in luminance between the adjacent pixels, the pixel value of each pixel, G11 through G14, is 100, as shown in FIG. 9. Accordingly, the pixel value of the interpolated pixel GX normally also can be expected to be about 100. FIG. 9 illustrates the case of uniform luminance where the pixel value of the interpolated pixel GX calculated from Equation (1) is 100. In contrast to the situation of uniform luminance, FIG. 10 shows the edge portion of an image where the pixel values of pixels G11 through G13 are 100, but the pixel value of pixel G14 is 0. In this case, although the pixel value of the interpolated pixel GX should be about 100, since this is an edge portion of the image, the pixel value of the interpolated pixel GX calculated from Equation (1) is 75. As a result, the edge portion becomes jagged after pixel interpolation processing, and also results in the disadvantage of producing false color.
Thus, when using conventional pixel interpolation methods in the case of high frequency regions such as edge images and slit images, disadvantages arise such as image edge corruption, edge jaggedness, and false color. These disadvantages are particularly acute when pixel interpolation is performed by a simple mean method for the green (G) for a CCD having a Bayer array type pixel arrangement because there, the green (G) sampling frequency is twice the sampling frequency of the red (R) and blue (B).
A device which shows one method of eliminating this disadvantage is disclosed in Japanese Laid-Open Patent Application No. 7-59098. The disclosed device determines the slopes of pixel values in the image data in two directions, compares each slope to a predetermined threshold, and interpolates the missing pixel value based on pixel data in only one image direction based on the comparison of slopes. Unfortunately, however, when the pixel value slopes in a region are near the threshold value, interpolation calculations can switch back and forth between directions resulting in marked differences in interpolated values even when the image data has only slight fluctuations. Consequently, the condition of the image, including halftones, color matching, and edge shape may exhibit extreme variations.